package com.eos.control.action.activity;

import java.util.ArrayList;
import java.util.List;

import com.eos.common.tool.DataCacheUtil;
import com.eos.control.action.base.AbstractBaseAction;
import com.eos.orm.mybatis.model.SysCustomer;

public class AddActivityAction extends AbstractBaseAction {
	private static final long serialVersionUID = -6038287092504896473L;
	private List<SysCustomer> customerList;

	public List<SysCustomer> getCustomerList() {
		return customerList;
	}

	@Override
	public String execute() {
		try {
			List<SysCustomer> cList = DataCacheUtil.getAllSysCustomer();
			List<SysCustomer> rtnList = null;
			if(null != cList){
				rtnList = new ArrayList<SysCustomer>();
				for(SysCustomer c : cList){
					if("0".equals(c.getCustomerType())){
						rtnList.add(c);
					}
				}
				customerList = rtnList;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return SUCCESS;
	}
}
